<template>
  <view class="container">
    <view class="help-list">
      <navigator
        :url="'./helpdetail?uuid={{item.uuid}}'"
        open-type="navigate"
        v-for="item in helpList"
        :key="item.id"
      >
        <view class="help-item">
          <view class="itme-left">
            <span>{{ item.title }}</span>
          </view>
          <view class="item-right iconfont icon-arrow-right"></view>
        </view>
      </navigator>
    </view>
  </view>
</template>

<script>
// 引入接口文件
const { getHelpList } = require("../../api/user/help");
export default {
  props: {},
  components: {},
  data() {
    return {
      helpList: [],
    };
  },
  computed: {},
  watch: {},
  methods: {
    // 获取数据
    getHelpData() {
      getHelpList().then(
        res => {
          this.helpList = res;
        },
        err => {
          uni.showToast({ title: err, icon: "none" });
        }
      );
    },
  },
  created() {
    this.getHelpData();
  },
  mounted() {},
  beforeDestroy() {},
};
</script>

<style lang="scss" scoped>
.help-list {
  margin-top: 20rpx;

  .help-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 88rpx;
    padding: 24rpx 30rpx;
    background-color: #fff;
    border: 2rpx solid #f7f8fe;

    .itme-left {
      flex: 1;
    }

    .itme-right {
      width: 30rpx;
      height: 30rpx;
    }
  }
}
</style>
